<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script src="./js/vue.js"></script>
</head>
<body>

<div id="app">
    <!--    双向数据绑定-->
    <input type="text" v-model="name">

    {{name}}
    <hr/>
    {{age}}
    <hr/>
    <!--    调用方法-->
    {{app()}}
    <hr/>
    {{ ["wkk","pmx","syc"] }}
    <hr/>
    {{ ["wkk","pmx","syc"][1] }}
    <hr/>
    {{ {name:"wkk",age:18} }}
    <hr/>
    {{ {name:"wkk",age:18}.name }}
    <hr/>
    {{arr[3]}}
</div>
<script>
     new Vue({
        el: "#app",  //el : vue绑定那个元素
        data: {  //声明对象 json类型
            name: "wkk",
            age: 18,
            arr: [18,20,25,30]
        },
        methods : {
            app : function () {
                return "Hello Vue";
            }
        } 
    });
</script>
</body>
</html>